load("@rules_java//java:defs.bzl", "java_library")
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:java_grpc_library.bzl", "java_grpc_library")

java_library(
    name = "grpclb",
    srcs = glob([
        "src/main/java/io/grpc/grpclb/*.java",
    ]),
    resources = glob([
        "src/main/resources/**",
    ]),
    visibility = ["//visibility:public"],
    deps = [
        ":load_balancer_java_grpc",
        "//api",
        "//context",
        "//core:internal",
        "//stub",
        "@com_google_protobuf//:protobuf_java_util",
        "@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto",
        artifact("com.google.code.findbugs:jsr305"),
        artifact("com.google.errorprone:error_prone_annotations"),
        artifact("com.google.guava:guava"),
    ],
)

java_grpc_library(
    name = "load_balancer_java_grpc",
    srcs = ["@io_grpc_grpc_proto//:grpclb_load_balancer_proto"],
    deps = ["@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto"],
)
